#ifndef AW_LOCAL_VIEWPORT_NOOSFTERM
#define AW_LOCAL_VIEWPORT_NOOSFTERM

class AW_LVP_NOOSFTerm : public AW_LocalViewport {

public:
	AW_LVP_NOOSFTerm(int x,int y,int dx,int dy,FeatureTerm *ft,FTKBase *dm);
	~AW_LVP_NOOSFTerm();

	FeatureTerm *get_ft(void);

protected:
	virtual void draw_internal(void);
	virtual bool MouseClick_internal(int selected);


	bool is_value_of(FeatureTerm *f1,FeatureTerm *f2);
	void compute_position(int id);
	void move_subtree(int id,float x,float y);


	FTFont* m_font;

	FeatureTerm *m_ft;
	FTKBase *m_domainmodel;

	float m_zoom;
	float m_desired_zoom;

	float m_center_x,m_center_y;

	/* Data needed to draw the FeatureTerm: */ 
	int m_nnodes;
	FeatureTerm **m_nodes;
	float *m_x;
	float *m_y;
	float *m_dx;
	float *m_dy;
};

#endif

